/*
 * MIT License
 *
 * Copyright (c) 2023 OrdinaryRoad
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: douyin.proto

// Protobuf Java Version: 3.25.3
package tech.ordinaryroad.live.chat.client.codec.douyin.protobuf;

/**
 * Protobuf type {@code FansClubData}
 */
public final class FansClubData extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:FansClubData)
    FansClubDataOrBuilder {
private static final long serialVersionUID = 0L;
  // Use FansClubData.newBuilder() to construct.
  private FansClubData(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private FansClubData() {
    clubName_ = "";
    availableGiftIds_ = emptyLongList();
  }

  @Override
  @SuppressWarnings({"unused"})
  protected Object newInstance(
      UnusedPrivateParameter unused) {
    return new FansClubData();
  }

  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return Douyin.internal_static_FansClubData_descriptor;
  }

  @Override
  protected FieldAccessorTable
      internalGetFieldAccessorTable() {
    return Douyin.internal_static_FansClubData_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            FansClubData.class, Builder.class);
  }

  private int bitField0_;
  public static final int CLUBNAME_FIELD_NUMBER = 1;
  @SuppressWarnings("serial")
  private volatile Object clubName_ = "";
  /**
   * <code>string clubName = 1;</code>
   * @return The clubName.
   */
  @Override
  public String getClubName() {
    Object ref = clubName_;
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      clubName_ = s;
      return s;
    }
  }
  /**
   * <code>string clubName = 1;</code>
   * @return The bytes for clubName.
   */
  @Override
  public com.google.protobuf.ByteString
      getClubNameBytes() {
    Object ref = clubName_;
    if (ref instanceof String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (String) ref);
      clubName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int LEVEL_FIELD_NUMBER = 2;
  private int level_ = 0;
  /**
   * <code>int32 level = 2;</code>
   * @return The level.
   */
  @Override
  public int getLevel() {
    return level_;
  }

  public static final int USERFANSCLUBSTATUS_FIELD_NUMBER = 3;
  private int userFansClubStatus_ = 0;
  /**
   * <code>int32 userFansClubStatus = 3;</code>
   * @return The userFansClubStatus.
   */
  @Override
  public int getUserFansClubStatus() {
    return userFansClubStatus_;
  }

  public static final int BADGE_FIELD_NUMBER = 4;
  private UserBadge badge_;
  /**
   * <code>.UserBadge badge = 4;</code>
   * @return Whether the badge field is set.
   */
  @Override
  public boolean hasBadge() {
    return ((bitField0_ & 0x00000001) != 0);
  }
  /**
   * <code>.UserBadge badge = 4;</code>
   * @return The badge.
   */
  @Override
  public UserBadge getBadge() {
    return badge_ == null ? UserBadge.getDefaultInstance() : badge_;
  }
  /**
   * <code>.UserBadge badge = 4;</code>
   */
  @Override
  public UserBadgeOrBuilder getBadgeOrBuilder() {
    return badge_ == null ? UserBadge.getDefaultInstance() : badge_;
  }

  public static final int AVAILABLEGIFTIDS_FIELD_NUMBER = 5;
  @SuppressWarnings("serial")
  private com.google.protobuf.Internal.LongList availableGiftIds_ =
      emptyLongList();
  /**
   * <code>repeated int64 availableGiftIds = 5;</code>
   * @return A list containing the availableGiftIds.
   */
  @Override
  public java.util.List<Long>
      getAvailableGiftIdsList() {
    return availableGiftIds_;
  }
  /**
   * <code>repeated int64 availableGiftIds = 5;</code>
   * @return The count of availableGiftIds.
   */
  public int getAvailableGiftIdsCount() {
    return availableGiftIds_.size();
  }
  /**
   * <code>repeated int64 availableGiftIds = 5;</code>
   * @param index The index of the element to return.
   * @return The availableGiftIds at the given index.
   */
  public long getAvailableGiftIds(int index) {
    return availableGiftIds_.getLong(index);
  }
  private int availableGiftIdsMemoizedSerializedSize = -1;

  public static final int ANCHORID_FIELD_NUMBER = 6;
  private long anchorId_ = 0L;
  /**
   * <code>int64 anchorId = 6;</code>
   * @return The anchorId.
   */
  @Override
  public long getAnchorId() {
    return anchorId_;
  }

  private byte memoizedIsInitialized = -1;
  @Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @Override
  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    getSerializedSize();
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clubName_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, clubName_);
    }
    if (level_ != 0) {
      output.writeInt32(2, level_);
    }
    if (userFansClubStatus_ != 0) {
      output.writeInt32(3, userFansClubStatus_);
    }
    if (((bitField0_ & 0x00000001) != 0)) {
      output.writeMessage(4, getBadge());
    }
    if (getAvailableGiftIdsList().size() > 0) {
      output.writeUInt32NoTag(42);
      output.writeUInt32NoTag(availableGiftIdsMemoizedSerializedSize);
    }
    for (int i = 0; i < availableGiftIds_.size(); i++) {
      output.writeInt64NoTag(availableGiftIds_.getLong(i));
    }
    if (anchorId_ != 0L) {
      output.writeInt64(6, anchorId_);
    }
    getUnknownFields().writeTo(output);
  }

  @Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clubName_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, clubName_);
    }
    if (level_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(2, level_);
    }
    if (userFansClubStatus_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(3, userFansClubStatus_);
    }
    if (((bitField0_ & 0x00000001) != 0)) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(4, getBadge());
    }
    {
      int dataSize = 0;
      for (int i = 0; i < availableGiftIds_.size(); i++) {
        dataSize += com.google.protobuf.CodedOutputStream
          .computeInt64SizeNoTag(availableGiftIds_.getLong(i));
      }
      size += dataSize;
      if (!getAvailableGiftIdsList().isEmpty()) {
        size += 1;
        size += com.google.protobuf.CodedOutputStream
            .computeInt32SizeNoTag(dataSize);
      }
      availableGiftIdsMemoizedSerializedSize = dataSize;
    }
    if (anchorId_ != 0L) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt64Size(6, anchorId_);
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @Override
  public boolean equals(final Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof FansClubData)) {
      return super.equals(obj);
    }
    FansClubData other = (FansClubData) obj;

    if (!getClubName()
        .equals(other.getClubName())) return false;
    if (getLevel()
        != other.getLevel()) return false;
    if (getUserFansClubStatus()
        != other.getUserFansClubStatus()) return false;
    if (hasBadge() != other.hasBadge()) return false;
    if (hasBadge()) {
      if (!getBadge()
          .equals(other.getBadge())) return false;
    }
    if (!getAvailableGiftIdsList()
        .equals(other.getAvailableGiftIdsList())) return false;
    if (getAnchorId()
        != other.getAnchorId()) return false;
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + CLUBNAME_FIELD_NUMBER;
    hash = (53 * hash) + getClubName().hashCode();
    hash = (37 * hash) + LEVEL_FIELD_NUMBER;
    hash = (53 * hash) + getLevel();
    hash = (37 * hash) + USERFANSCLUBSTATUS_FIELD_NUMBER;
    hash = (53 * hash) + getUserFansClubStatus();
    if (hasBadge()) {
      hash = (37 * hash) + BADGE_FIELD_NUMBER;
      hash = (53 * hash) + getBadge().hashCode();
    }
    if (getAvailableGiftIdsCount() > 0) {
      hash = (37 * hash) + AVAILABLEGIFTIDS_FIELD_NUMBER;
      hash = (53 * hash) + getAvailableGiftIdsList().hashCode();
    }
    hash = (37 * hash) + ANCHORID_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
        getAnchorId());
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static FansClubData parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static FansClubData parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static FansClubData parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static FansClubData parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static FansClubData parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static FansClubData parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static FansClubData parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static FansClubData parseFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  public static FansClubData parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }

  public static FansClubData parseDelimitedFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
  }
  public static FansClubData parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static FansClubData parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  @Override
  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(FansClubData prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  @Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE
        ? new Builder() : new Builder().mergeFrom(this);
  }

  @Override
  protected Builder newBuilderForType(
      BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * Protobuf type {@code FansClubData}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:FansClubData)
      FansClubDataOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return Douyin.internal_static_FansClubData_descriptor;
    }

    @Override
    protected FieldAccessorTable
        internalGetFieldAccessorTable() {
      return Douyin.internal_static_FansClubData_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              FansClubData.class, Builder.class);
    }

    // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.FansClubData.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
        getBadgeFieldBuilder();
      }
    }
    @Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      clubName_ = "";
      level_ = 0;
      userFansClubStatus_ = 0;
      badge_ = null;
      if (badgeBuilder_ != null) {
        badgeBuilder_.dispose();
        badgeBuilder_ = null;
      }
      availableGiftIds_ = emptyLongList();
      anchorId_ = 0L;
      return this;
    }

    @Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return Douyin.internal_static_FansClubData_descriptor;
    }

    @Override
    public FansClubData getDefaultInstanceForType() {
      return FansClubData.getDefaultInstance();
    }

    @Override
    public FansClubData build() {
      FansClubData result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @Override
    public FansClubData buildPartial() {
      FansClubData result = new FansClubData(this);
      if (bitField0_ != 0) { buildPartial0(result); }
      onBuilt();
      return result;
    }

    private void buildPartial0(FansClubData result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.clubName_ = clubName_;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.level_ = level_;
      }
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.userFansClubStatus_ = userFansClubStatus_;
      }
      int to_bitField0_ = 0;
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.badge_ = badgeBuilder_ == null
            ? badge_
            : badgeBuilder_.build();
        to_bitField0_ |= 0x00000001;
      }
      if (((from_bitField0_ & 0x00000010) != 0)) {
        availableGiftIds_.makeImmutable();
        result.availableGiftIds_ = availableGiftIds_;
      }
      if (((from_bitField0_ & 0x00000020) != 0)) {
        result.anchorId_ = anchorId_;
      }
      result.bitField0_ |= to_bitField0_;
    }

    @Override
    public Builder clone() {
      return super.clone();
    }
    @Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        Object value) {
      return super.setField(field, value);
    }
    @Override
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }
    @Override
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }
    @Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, Object value) {
      return super.setRepeatedField(field, index, value);
    }
    @Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        Object value) {
      return super.addRepeatedField(field, value);
    }
    @Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof FansClubData) {
        return mergeFrom((FansClubData)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(FansClubData other) {
      if (other == FansClubData.getDefaultInstance()) return this;
      if (!other.getClubName().isEmpty()) {
        clubName_ = other.clubName_;
        bitField0_ |= 0x00000001;
        onChanged();
      }
      if (other.getLevel() != 0) {
        setLevel(other.getLevel());
      }
      if (other.getUserFansClubStatus() != 0) {
        setUserFansClubStatus(other.getUserFansClubStatus());
      }
      if (other.hasBadge()) {
        mergeBadge(other.getBadge());
      }
      if (!other.availableGiftIds_.isEmpty()) {
        if (availableGiftIds_.isEmpty()) {
          availableGiftIds_ = other.availableGiftIds_;
          availableGiftIds_.makeImmutable();
          bitField0_ |= 0x00000010;
        } else {
          ensureAvailableGiftIdsIsMutable();
          availableGiftIds_.addAll(other.availableGiftIds_);
        }
        onChanged();
      }
      if (other.getAnchorId() != 0L) {
        setAnchorId(other.getAnchorId());
      }
      this.mergeUnknownFields(other.getUnknownFields());
      onChanged();
      return this;
    }

    @Override
    public final boolean isInitialized() {
      return true;
    }

    @Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      if (extensionRegistry == null) {
        throw new NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10: {
              clubName_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00000001;
              break;
            } // case 10
            case 16: {
              level_ = input.readInt32();
              bitField0_ |= 0x00000002;
              break;
            } // case 16
            case 24: {
              userFansClubStatus_ = input.readInt32();
              bitField0_ |= 0x00000004;
              break;
            } // case 24
            case 34: {
              input.readMessage(
                  getBadgeFieldBuilder().getBuilder(),
                  extensionRegistry);
              bitField0_ |= 0x00000008;
              break;
            } // case 34
            case 40: {
              long v = input.readInt64();
              ensureAvailableGiftIdsIsMutable();
              availableGiftIds_.addLong(v);
              break;
            } // case 40
            case 42: {
              int length = input.readRawVarint32();
              int limit = input.pushLimit(length);
              ensureAvailableGiftIdsIsMutable();
              while (input.getBytesUntilLimit() > 0) {
                availableGiftIds_.addLong(input.readInt64());
              }
              input.popLimit(limit);
              break;
            } // case 42
            case 48: {
              anchorId_ = input.readInt64();
              bitField0_ |= 0x00000020;
              break;
            } // case 48
            default: {
              if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                done = true; // was an endgroup tag
              }
              break;
            } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }
    private int bitField0_;

    private Object clubName_ = "";
    /**
     * <code>string clubName = 1;</code>
     * @return The clubName.
     */
    public String getClubName() {
      Object ref = clubName_;
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        clubName_ = s;
        return s;
      } else {
        return (String) ref;
      }
    }
    /**
     * <code>string clubName = 1;</code>
     * @return The bytes for clubName.
     */
    public com.google.protobuf.ByteString
        getClubNameBytes() {
      Object ref = clubName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        clubName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string clubName = 1;</code>
     * @param value The clubName to set.
     * @return This builder for chaining.
     */
    public Builder setClubName(
        String value) {
      if (value == null) { throw new NullPointerException(); }
      clubName_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     * <code>string clubName = 1;</code>
     * @return This builder for chaining.
     */
    public Builder clearClubName() {
      clubName_ = getDefaultInstance().getClubName();
      bitField0_ = (bitField0_ & ~0x00000001);
      onChanged();
      return this;
    }
    /**
     * <code>string clubName = 1;</code>
     * @param value The bytes for clubName to set.
     * @return This builder for chaining.
     */
    public Builder setClubNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      clubName_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }

    private int level_ ;
    /**
     * <code>int32 level = 2;</code>
     * @return The level.
     */
    @Override
    public int getLevel() {
      return level_;
    }
    /**
     * <code>int32 level = 2;</code>
     * @param value The level to set.
     * @return This builder for chaining.
     */
    public Builder setLevel(int value) {

      level_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     * <code>int32 level = 2;</code>
     * @return This builder for chaining.
     */
    public Builder clearLevel() {
      bitField0_ = (bitField0_ & ~0x00000002);
      level_ = 0;
      onChanged();
      return this;
    }

    private int userFansClubStatus_ ;
    /**
     * <code>int32 userFansClubStatus = 3;</code>
     * @return The userFansClubStatus.
     */
    @Override
    public int getUserFansClubStatus() {
      return userFansClubStatus_;
    }
    /**
     * <code>int32 userFansClubStatus = 3;</code>
     * @param value The userFansClubStatus to set.
     * @return This builder for chaining.
     */
    public Builder setUserFansClubStatus(int value) {

      userFansClubStatus_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     * <code>int32 userFansClubStatus = 3;</code>
     * @return This builder for chaining.
     */
    public Builder clearUserFansClubStatus() {
      bitField0_ = (bitField0_ & ~0x00000004);
      userFansClubStatus_ = 0;
      onChanged();
      return this;
    }

    private UserBadge badge_;
    private com.google.protobuf.SingleFieldBuilderV3<
        UserBadge, UserBadge.Builder, UserBadgeOrBuilder> badgeBuilder_;
    /**
     * <code>.UserBadge badge = 4;</code>
     * @return Whether the badge field is set.
     */
    public boolean hasBadge() {
      return ((bitField0_ & 0x00000008) != 0);
    }
    /**
     * <code>.UserBadge badge = 4;</code>
     * @return The badge.
     */
    public UserBadge getBadge() {
      if (badgeBuilder_ == null) {
        return badge_ == null ? UserBadge.getDefaultInstance() : badge_;
      } else {
        return badgeBuilder_.getMessage();
      }
    }
    /**
     * <code>.UserBadge badge = 4;</code>
     */
    public Builder setBadge(UserBadge value) {
      if (badgeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        badge_ = value;
      } else {
        badgeBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     * <code>.UserBadge badge = 4;</code>
     */
    public Builder setBadge(
        UserBadge.Builder builderForValue) {
      if (badgeBuilder_ == null) {
        badge_ = builderForValue.build();
      } else {
        badgeBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     * <code>.UserBadge badge = 4;</code>
     */
    public Builder mergeBadge(UserBadge value) {
      if (badgeBuilder_ == null) {
        if (((bitField0_ & 0x00000008) != 0) &&
          badge_ != null &&
          badge_ != UserBadge.getDefaultInstance()) {
          getBadgeBuilder().mergeFrom(value);
        } else {
          badge_ = value;
        }
      } else {
        badgeBuilder_.mergeFrom(value);
      }
      if (badge_ != null) {
        bitField0_ |= 0x00000008;
        onChanged();
      }
      return this;
    }
    /**
     * <code>.UserBadge badge = 4;</code>
     */
    public Builder clearBadge() {
      bitField0_ = (bitField0_ & ~0x00000008);
      badge_ = null;
      if (badgeBuilder_ != null) {
        badgeBuilder_.dispose();
        badgeBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     * <code>.UserBadge badge = 4;</code>
     */
    public UserBadge.Builder getBadgeBuilder() {
      bitField0_ |= 0x00000008;
      onChanged();
      return getBadgeFieldBuilder().getBuilder();
    }
    /**
     * <code>.UserBadge badge = 4;</code>
     */
    public UserBadgeOrBuilder getBadgeOrBuilder() {
      if (badgeBuilder_ != null) {
        return badgeBuilder_.getMessageOrBuilder();
      } else {
        return badge_ == null ?
            UserBadge.getDefaultInstance() : badge_;
      }
    }
    /**
     * <code>.UserBadge badge = 4;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        UserBadge, UserBadge.Builder, UserBadgeOrBuilder>
        getBadgeFieldBuilder() {
      if (badgeBuilder_ == null) {
        badgeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            UserBadge, UserBadge.Builder, UserBadgeOrBuilder>(
                getBadge(),
                getParentForChildren(),
                isClean());
        badge_ = null;
      }
      return badgeBuilder_;
    }

    private com.google.protobuf.Internal.LongList availableGiftIds_ = emptyLongList();
    private void ensureAvailableGiftIdsIsMutable() {
      if (!availableGiftIds_.isModifiable()) {
        availableGiftIds_ = makeMutableCopy(availableGiftIds_);
      }
      bitField0_ |= 0x00000010;
    }
    /**
     * <code>repeated int64 availableGiftIds = 5;</code>
     * @return A list containing the availableGiftIds.
     */
    public java.util.List<Long>
        getAvailableGiftIdsList() {
      availableGiftIds_.makeImmutable();
      return availableGiftIds_;
    }
    /**
     * <code>repeated int64 availableGiftIds = 5;</code>
     * @return The count of availableGiftIds.
     */
    public int getAvailableGiftIdsCount() {
      return availableGiftIds_.size();
    }
    /**
     * <code>repeated int64 availableGiftIds = 5;</code>
     * @param index The index of the element to return.
     * @return The availableGiftIds at the given index.
     */
    public long getAvailableGiftIds(int index) {
      return availableGiftIds_.getLong(index);
    }
    /**
     * <code>repeated int64 availableGiftIds = 5;</code>
     * @param index The index to set the value at.
     * @param value The availableGiftIds to set.
     * @return This builder for chaining.
     */
    public Builder setAvailableGiftIds(
        int index, long value) {

      ensureAvailableGiftIdsIsMutable();
      availableGiftIds_.setLong(index, value);
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     * <code>repeated int64 availableGiftIds = 5;</code>
     * @param value The availableGiftIds to add.
     * @return This builder for chaining.
     */
    public Builder addAvailableGiftIds(long value) {

      ensureAvailableGiftIdsIsMutable();
      availableGiftIds_.addLong(value);
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     * <code>repeated int64 availableGiftIds = 5;</code>
     * @param values The availableGiftIds to add.
     * @return This builder for chaining.
     */
    public Builder addAllAvailableGiftIds(
        Iterable<? extends Long> values) {
      ensureAvailableGiftIdsIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(
          values, availableGiftIds_);
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     * <code>repeated int64 availableGiftIds = 5;</code>
     * @return This builder for chaining.
     */
    public Builder clearAvailableGiftIds() {
      availableGiftIds_ = emptyLongList();
      bitField0_ = (bitField0_ & ~0x00000010);
      onChanged();
      return this;
    }

    private long anchorId_ ;
    /**
     * <code>int64 anchorId = 6;</code>
     * @return The anchorId.
     */
    @Override
    public long getAnchorId() {
      return anchorId_;
    }
    /**
     * <code>int64 anchorId = 6;</code>
     * @param value The anchorId to set.
     * @return This builder for chaining.
     */
    public Builder setAnchorId(long value) {

      anchorId_ = value;
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     * <code>int64 anchorId = 6;</code>
     * @return This builder for chaining.
     */
    public Builder clearAnchorId() {
      bitField0_ = (bitField0_ & ~0x00000020);
      anchorId_ = 0L;
      onChanged();
      return this;
    }
    @Override
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

    @Override
    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }


    // @@protoc_insertion_point(builder_scope:FansClubData)
  }

  // @@protoc_insertion_point(class_scope:FansClubData)
  private static final FansClubData DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new FansClubData();
  }

  public static FansClubData getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<FansClubData>
      PARSER = new com.google.protobuf.AbstractParser<FansClubData>() {
    @Override
    public FansClubData parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      Builder builder = newBuilder();
      try {
        builder.mergeFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(builder.buildPartial());
      } catch (com.google.protobuf.UninitializedMessageException e) {
        throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(e)
            .setUnfinishedMessage(builder.buildPartial());
      }
      return builder.buildPartial();
    }
  };

  public static com.google.protobuf.Parser<FansClubData> parser() {
    return PARSER;
  }

  @Override
  public com.google.protobuf.Parser<FansClubData> getParserForType() {
    return PARSER;
  }

  @Override
  public FansClubData getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

